﻿using SportsPlatform.Consts;
using SportsPlatform.Dto.SportBusiness.Competition;
using SportsPlatform.SportBusiness.ISportBusiness;
using SportsPlatform.Model.SportBusiness;
using SportsPlatform.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.ObjectMapping;
using Abp.Domain.Repositories;
using SportsPlatform.SqlExecuter;
using SportsPlatform.Query.Competition;
using SportsPlatform.Jwt;
using SportsPlatform.Enums;
using Microsoft.AspNetCore.Mvc;
using SportsPlatform.Query.PermissionManagement.CompanyInfo;
using Microsoft.AspNetCore.Http;
using SportsPlatform.Global;
using Microsoft.Extensions.Configuration;
using SportsPlatform.Configuration;
using Abp.Reflection.Extensions;
using SqlSugar;
using SportsPlatform.Dto.SportBusiness.CompetitionProjec;
using static iTextSharp.text.pdf.AcroFields;

namespace SportsPlatform.SportBusiness.SportBusiness
{
    /// <summary>
    /// 赛事相关接口实现类
    /// </summary>
    [RemoteService(false)]  //隐藏自动生成的WebApi
    public class CompetitionService : SportsPlatformAppServiceBase, ICompetitionService
    {
        #region 私有类型

        private readonly IRepository<Competition, Guid> repository;
        private readonly ISqlExecuterRepository sqlExecuterRepository;
        private readonly IRepository<CompetitionProject, Guid> comProjectRepository;
        private readonly IRepository<RegistrationInfo, Guid> regRepository;
        private readonly IRepository<CompetitionUnit, Guid> unitRepository;
        private readonly IHttpContextAccessor _context;
        //配置
        private readonly IConfiguration _appConfiguration;

        #endregion

        #region 构造函数

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="_repository"></param>
        /// <param name="_sqlExecuterRepository"></param>
        /// <param name="_comProjectRepository"></param>
        /// <param name="_regRepository"></param>
        /// <param name="_unitRepository"></param>
        public CompetitionService(IRepository<Competition, Guid> _repository,
            ISqlExecuterRepository _sqlExecuterRepository,
            IRepository<CompetitionProject, Guid> _comProjectRepository,
            IRepository<RegistrationInfo, Guid> _regRepository,
            IRepository<CompetitionUnit, Guid> _unitRepository,
            IHttpContextAccessor context) : base(context)
        {
            repository = _repository;
            sqlExecuterRepository = _sqlExecuterRepository;
            comProjectRepository = _comProjectRepository;
            regRepository = _regRepository;
            unitRepository = _unitRepository;
            _context = context;
            _appConfiguration = AppConfigurations.Get(typeof(CompetitionService).GetAssembly().GetDirectoryPathOrNull());
        }

        #endregion

        #region 公共API接口

        /// <summary>
        /// 分页获取赛事列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public async Task<PagePagingDto<Clientlog>> GetCompetitionPageList(GetCompetitionPageListQuery query)
        {
            PagePagingDto<Clientlog> result = new PagePagingDto<Clientlog>();
            try
            {
                var CompanyId = UldAdminSessionContext.GetCurrentUserInfo(_context).CompanyId;
                string where = " where 1=1";
                string order = "";
                if (!string.IsNullOrEmpty(query.Sort))
                {
                    if (!string.IsNullOrEmpty(query.Order))
                    {
                        order = " ORDER BY com." + query.Sort + " " + query.Order;
                    }
                    else
                    {
                        order = " ORDER BY com." + query.Sort + " Desc";
                    }
                }
                else
                {
                    if (!string.IsNullOrEmpty(query.Order))
                    {
                        order = " ORDER BY com.CreateTime " + query.Order;
                    }
                    else
                    {
                        order = " ORDER BY com.CreateTime Desc";
                    }
                }
                if (!string.IsNullOrEmpty(query.Name))
                {
                    where += " and com.Name like '%" + query.Name + "%'";
                }
                if (!string.IsNullOrEmpty(query.Merchants))
                {
                    where += " and com.Merchants = '" + query.Merchants + "'";
                }
                else if (CompanyId != null)
                {
                    where += " and com.Merchants = '" + CompanyId + "'";
                }
                if (query.State != null && query.State > -1)
                {
                    where += " and com.State=" + query.State;
                }
                if (query.IsEnable != null)
                {
                    where += " and com.IsEnable=1";
                }
                if (query.GameBeginTime.HasValue)
                {
                    var date = Convert.ToDateTime(Convert.ToDateTime(query.GameBeginTime).ToString("yyyy-MM-dd") + " 00:00:00");
                    where += $" and com.MatchBeginTime>='{date}'";
                }
                if (query.GameEndTime.HasValue)
                {
                    var date = Convert.ToDateTime(Convert.ToDateTime(query.GameEndTime).ToString("yyyy-MM-dd") + " 23:59:59");
                    where += $" and com.MatchEndTime<='{date}'";
                }
                if (query.SignBeginTime.HasValue)
                {
                    var date = Convert.ToDateTime(Convert.ToDateTime(query.SignBeginTime).ToString("yyyy-MM-dd") + " 00:00:00");
                    where += $" and com.SignUpBeginTime>='{date}'";

                }
                if (query.SignEndTime.HasValue)
                {
                    var date = Convert.ToDateTime(Convert.ToDateTime(query.SignEndTime).ToString("yyyy-MM-dd") + " 23:59:59");
                    where += $" and com.SingUpEndTime<='{date}'";
                }
                if (!string.IsNullOrEmpty(query.City))
                {
                    where += " and com.City='" + query.City + "'";
                }
                //if (!string.IsNullOrEmpty(query.KeyWords))
                //{
                //    where += " and (com.Name like '%" + query.KeyWords + "%' or com.Address like '%" + query.KeyWords + "%')";
                //}
                string sql = string.Format("select com.Id as Id,com.Name as Name,c.CompanyName as Merchants,com.Address as Address,com.City as City,com.ChargeType as ChargeType," +
                    "com.DetailsAddress as DetailsAddress,com.SignUpBeginTime as SignUpBeginTime, com.SingUpEndTime as SingUpEndTime,com.IsEnable as IsEnable," +
                    "com.MatchBeginTime as MatchBeginTime,com.MatchEndTime as MatchEndTime,com.State as State,0 as SignPeopleCount,0 as ProjectCount " +
                    "from T_B_Competition com " +
                    "LEFT JOIN PM_CompanyInfo c on com.Merchants = c.Id " + where + order);


                var ll = await sqlExecuterRepository.QueryAsync<Clientlog>(sql);

                //查询主办单位
                var unit = unitRepository.GetAllList().Where(a => a.Type == 1).Where(a => a.IsDeleted == false).ToList();
                //判断关键字
                ll = ll.ToList().WhereIF(!string.IsNullOrEmpty(query.KeyWords), info => info.Name.Contains(query.KeyWords)
                || info.Address.Contains(query.KeyWords) || unit.Where(un => un.CompetitionId == info.Id && un.Name.Contains(query.KeyWords)).Count() > 0).ToList();
                var list = ll.ToList();
                //二维码链接地址
                string qrcodeurl = "";
                try
                {
                    qrcodeurl = _appConfiguration["QrCode:Url"];
                }
                catch { }
                if (list.Count() > 0)
                {
                    list = list.Skip(query.PageSize * (query.PageIndex - 1))
                   .Take(query.PageSize)
                   .ToList();

                    //查询项目
                    var project = comProjectRepository.GetAllList().Where(o => o.IsDeleted == false && o.State > 0).ToList();
                    var reg = regRepository.GetAllList().Where(o => o.IsDeleted == false).ToList();


                    foreach (var item in list)
                    {
                        var p = project.Where(o => o.CompetitionId == item.Id).ToList();
                        item.ProjectCount = p.Count;
                        var r = reg.Where(o => o.CompetitionId == item.Id).ToList();
                        item.SignPeopleCount = r.Count;
                        var un = unit.Where(o => o.CompetitionId == item.Id).ToList();
                        foreach (var u in un)
                        {
                            item.HostUnit += u.Name + " | ";
                        }
                        item.HostUnit = item.HostUnit?.Substring(0, item.HostUnit.Length - 3) ?? "";

                        item.MatchTime = item.MatchBeginTime.ToString("yyyy-MM-dd") + "至" + item.MatchEndTime.ToString("MM-dd");
                        item.SignTime = item.SignUpBeginTime.ToString("yyyy-MM-dd") + "至" + item.SingUpEndTime.ToString("MM-dd");
                        item.QrCodeUrl = string.Format("{0}/qrCodeFile?id={1}", qrcodeurl, item.Id);
                    }
                    result.Data = list;
                    result.TotalCount = ll.Count();
                    result.Code = HttpResultCode.Success;
                    result.IsSuccess = true;
                    result.Message = "查询成功！";
                }
                else
                {
                    result.TotalCount = 0;
                    result.Code = HttpResultCode.NotData;
                    result.IsSuccess = false;
                    result.Data = null;
                    result.Message = "未查询到数据";
                }
            }
            catch (Exception ex)
            {
                result.IsSuccess = false;
                result.Code = HttpResultCode.Error;
                result.Message = ex.Message.ToString();
            }
            return result;
        }

        /// <summary>
        /// 新增、修改赛事
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public async Task<ResultByIdDto> EditCompetition(EditCompetitionQuery query)
        {
            var res = new ResultByIdDto();
            if (query.HostUnit.Count == 0)
            {
                res.Code = HttpResultCode.Fail;
                res.Message = "主办单位不能为空";
                res.IsSuccess = false;
                return res;
            }
            if (query.UndertakeUnit.Count == 0)
            {
                res.Code = HttpResultCode.Fail;
                res.Message = "承办单位不能为空";
                res.IsSuccess = false;
                return res;
            }
            if (query.AssistingUnit.Count == 0)
            {
                res.Code = HttpResultCode.Fail;
                res.Message = "协办单位不能为空";
                res.IsSuccess = false;
                return res;
            }
            Competition com = new Competition();
            com = ObjectMapper.Map<Competition>(query);
            try
            {
                var token = UldAdminSessionContext.GetCurrentUserInfo(_context);
                if (query.Merchants == null || query.Merchants == Guid.Empty)
                {
                    query.Merchants = token.CompanyId;
                    if (token.CompanyId == null || token.CompanyId == Guid.Empty)
                    {
                        res.Code = HttpResultCode.Fail;
                        res.Message = "商户Id不能为空！";
                        res.IsSuccess = false;
                        return res;
                    }
                }

                if (query.Id == Guid.Empty || query.Id == null)
                {
                    com.Id = Guid.NewGuid();
                    com.CreateTime = DateTime.Now;
                    //string uid = "A943DB58-7549-4911-20C9-08DA87349D51";
                    //com.CreateUserId = Guid.Parse(uid);
                    com.CreateUserId = token.Id;
                    //将报名结束时间和比赛结束时间在用户选择的时间后面加上（23时59分59秒）
                    com.SingUpEndTime = com.SingUpEndTime.AddDays(1).AddSeconds(-1);
                    com.MatchEndTime = com.MatchEndTime.AddDays(1).AddSeconds(-1);
                    var Id = await repository.InsertAndGetIdAsync(com);
                    if (Id != Guid.Empty)
                    {
                        var unit = new CompetitionUnit();
                        foreach (var item in query.HostUnit)
                        {
                            unit = new CompetitionUnit();
                            unit.Id = Guid.NewGuid();
                            unit.CompetitionId = Id;
                            unit.CreateTime = DateTime.Now;
                            unit.Type = 1;
                            unit.TelePohone = item.TelePohone;
                            unit.IsDeleted = false;
                            unit.LogoUrl = item.LogoUrl;
                            unit.Name = item.Name;
                            unit.Responsible = item.Responsible;
                            await unitRepository.InsertAsync(unit);
                        }
                        foreach (var item in query.UndertakeUnit)
                        {
                            unit = new CompetitionUnit();
                            unit.Id = Guid.NewGuid();
                            unit.CompetitionId = Id;
                            unit.CreateTime = DateTime.Now;
                            unit.Type = 2;
                            unit.TelePohone = item.TelePohone;
                            unit.IsDeleted = false;
                            unit.LogoUrl = item.LogoUrl;
                            unit.Name = item.Name;
                            unit.Responsible = item.Responsible;
                            await unitRepository.InsertAsync(unit);
                        }
                        foreach (var item in query.AssistingUnit)
                        {
                            unit = new CompetitionUnit();
                            unit.Id = Guid.NewGuid();
                            unit.CompetitionId = Id;
                            unit.CreateTime = DateTime.Now;
                            unit.Type = 3;
                            unit.TelePohone = item.TelePohone;
                            unit.IsDeleted = false;
                            unit.LogoUrl = item.LogoUrl;
                            unit.Name = item.Name;
                            unit.Responsible = item.Responsible;
                            await unitRepository.InsertAsync(unit);
                        }

                        res.Code = HttpResultCode.Success;
                        res.Message = "新增成功";
                        res.IsSuccess = true;
                        res.Data = new Base.Dto() { Id = Id };
                    }
                    else
                    {
                        res.Code = HttpResultCode.Error;
                        res.Message = "新增失败";
                        res.IsSuccess = false;
                    }
                }
                else
                {
                    com = new Competition();
                    com = repository.Get((Guid)query.Id);
                    com.Name = query.Name;
                    com.Address = query.Address;
                    com.Consultant = query.Consultant;
                    com.ChargeType = query.ChargeType;
                    com.City = query.City;
                    com.CoverPicture = query.CoverPicture;
                    com.DetailsAddress = query.DetailsAddress;
                    com.Details = query.Details;
                    com.Instructions = query.Instructions;
                    com.MatchBeginTime = query.MatchBeginTime;
                    com.MatchEndTime = query.MatchEndTime.AddDays(1).AddSeconds(-1);
                    com.Merchants = (Guid)query.Merchants;
                    com.Money = query.Money;
                    com.Point = query.Point;
                    com.RotationPicture = query.RotationPicture;
                    com.SignUpBeginTime = query.SignUpBeginTime;
                    com.SingUpEndTime = query.SingUpEndTime.AddDays(1).AddSeconds(-1);
                    com.State = query.State;
                    com.IsEnable = query.IsEnable;
                    //string uid = "A943DB58-7549-4911-20C9-08DA87349D51";
                    //com.UpdateUserId = Guid.Parse(uid);
                    com.UpdateUserId = token.Id;
                    com.UpdateTime = DateTime.Now;
                    com.TelePhone = query.TelePhone;
                    var istrue = await repository.UpdateAsync(com);
                    if (istrue != null)
                    {
                        //string sql = "UPDATE T_B_CompetitionUnit SET IsDeleted=1,DeleteUserId='" + Guid.Parse(uid) + "',DeleteTime='" + DateTime.Now + "' where CompetitionId='" + istrue.Id + "'";
                        string sql = "UPDATE T_B_CompetitionUnit SET IsDeleted=1,DeleteUserId='" + token.Id + "',DeleteTime='" + DateTime.Now + "' where CompetitionId='" + istrue.Id + "'";
                        int count = sqlExecuterRepository.Execute(sql, null);
                        if (count > 0)
                        {
                            var unit = new CompetitionUnit();
                            foreach (var item in query.HostUnit)
                            {
                                unit = new CompetitionUnit();
                                unit.Id = Guid.NewGuid();
                                unit.CompetitionId = istrue.Id;
                                unit.CreateTime = DateTime.Now;
                                unit.Type = 1;
                                unit.TelePohone = item.TelePohone;
                                unit.IsDeleted = false;
                                unit.LogoUrl = item.LogoUrl;
                                unit.Name = item.Name;
                                unit.Responsible = item.Responsible;
                                await unitRepository.InsertAsync(unit);
                            }
                            foreach (var item in query.UndertakeUnit)
                            {
                                unit = new CompetitionUnit();
                                unit.Id = Guid.NewGuid();
                                unit.CompetitionId = istrue.Id;
                                unit.CreateTime = DateTime.Now;
                                unit.Type = 2;
                                unit.TelePohone = item.TelePohone;
                                unit.IsDeleted = false;
                                unit.LogoUrl = item.LogoUrl;
                                unit.Name = item.Name;
                                unit.Responsible = item.Responsible;
                                await unitRepository.InsertAsync(unit);
                            }
                            foreach (var item in query.AssistingUnit)
                            {
                                unit = new CompetitionUnit();
                                unit.Id = Guid.NewGuid();
                                unit.CompetitionId = istrue.Id;
                                unit.CreateTime = DateTime.Now;
                                unit.Type = 3;
                                unit.TelePohone = item.TelePohone;
                                unit.IsDeleted = false;
                                unit.LogoUrl = item.LogoUrl;
                                unit.Name = item.Name;
                                unit.Responsible = item.Responsible;
                                await unitRepository.InsertAsync(unit);
                            }

                            res.Code = HttpResultCode.Success;
                            res.Message = "修改成功";
                            res.IsSuccess = true;
                            res.Data = new Base.Dto() { Id = (Guid)query.Id };
                        }
                    }
                    else
                    {
                        res.Code = HttpResultCode.Error;
                        res.Message = "修改失败";
                        res.IsSuccess = false;
                    }
                }
            }
            catch (Exception ex)
            {
                res.Message = ex.Message;
                res.Code = HttpResultCode.Error;
                res.IsSuccess = false;
            }
            return res;
        }

        /// <summary>
        /// 关闭赛事
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public async Task<BaseResultDto> CloseCompetition(CompetitionIdQuery query)
        {
            var res = new BaseResultDto();
            var com = await repository.GetAsync(query.Id);
            if (com != null)
            {
                com.State = (int)CompetitionStateEnum.关闭;
                var istrue = await repository.UpdateAsync(com);
                if (istrue != null)
                {
                    //如果比赛状态是正在报名或报名结束待比赛时，需要执行退款操作
                    if (com.State == 3 || com.State == 4)
                    {

                    }
                    res.Code = HttpResultCode.Success;
                    res.IsSuccess = true;
                    res.Message = "操作成功";
                }
                else
                {
                    res.Code = HttpResultCode.SqlError;
                    res.IsSuccess = false;
                    res.Message = "操作失败";
                }
            }
            else
            {
                res.Code = HttpResultCode.NotData;
                res.IsSuccess = false;
                res.Message = "未查到数据";
            }

            return res;
        }

        /// <summary>
        /// 发布赛事
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public async Task<BaseResultDto> ReleaseCompetition(CompetitionIdQuery query)
        {
            var res = new BaseResultDto();
            var com = await repository.GetAsync(query.Id);
            if (com != null)
            {
                if (com.IsEnable == 0)
                {
                    res.Code = HttpResultCode.TripartiteError;
                    res.IsSuccess = false;
                    res.Message = "该赛事未启用不能发布";
                }
                else
                {
                    com.State = 2;
                    var istrue = await repository.UpdateAsync(com);
                    if (istrue != null)
                    {
                        res.Code = HttpResultCode.Success;
                        res.IsSuccess = true;
                        res.Message = "操作成功";
                    }
                    else
                    {
                        res.Code = HttpResultCode.SqlError;
                        res.IsSuccess = false;
                        res.Message = "操作失败";
                    }
                }
            }
            else
            {
                res.Code = HttpResultCode.NotData;
                res.IsSuccess = false;
                res.Message = "未查到数据";
            }
            return res;
        }

        /// <summary>
        /// 根据赛事ID获取赛事详情
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public async Task<ResultDto<GetCompetitionDetailsDto>> GetCompetitionDetailsById([FromBody] CompetitionIdQuery query)
        {
            var res = new ResultDto<GetCompetitionDetailsDto>();
            var details = new GetCompetitionDetailsDto();
            var com = await repository.GetAsync(query.Id);
            if (com != null)
            {
                var unitlist = unitRepository.GetAllList().Where(a => a.CompetitionId == query.Id && a.IsDeleted == false);
                var hostUnit = unitlist.Where(a => a.Type == 1).ToList();
                var undertakeUnit = unitlist.Where(a => a.Type == 2).ToList();
                var assistingUnit = unitlist.Where(a => a.Type == 3).ToList();
                details = ObjectMapper.Map<GetCompetitionDetailsDto>(com);
                details.HostUnit = hostUnit;
                details.AssistingUnit = assistingUnit;
                details.UndertakeUnit = undertakeUnit;
                res.Data = details;
                res.Code = HttpResultCode.Success;
                res.Message = "查询成功";
                res.IsSuccess = true;
            }
            else
            {
                res.Data = null;
                res.IsSuccess = false;
                res.Code = HttpResultCode.NotData;
                res.Message = "未查询到数据";
            }
            return res;
        }


        /// <summary>
        /// 获取未关闭的赛事列表
        /// 根据当前用户的公司ID获取用于新增报名时获取未关闭的赛事列表
        /// </summary>
        /// <returns></returns>
        public async Task<ResultListDto<GetNotClosedCompetitionListDto>> GetNotClosedCompetitionList()
        {
            var res = new ResultListDto<GetNotClosedCompetitionListDto>();
            var list = new List<GetNotClosedCompetitionListDto>();

            var token = UldAdminSessionContext.GetCurrentUserInfo(_context);

            //获取状态为开始报名到比赛结束之前的未删除的且是启用的赛事列表
            var com = (await repository.GetAllListAsync())
                .Where(a => a.State > 2 && a.State < 6 && a.IsDeleted == false && a.IsEnable == 1)
                .WhereIF(token.CompanyId != null, info => info.Merchants == token.CompanyId)
                .ToList();
            if (com.Count > 0)
            {
                foreach (var item in com)
                {
                    var dto = new GetNotClosedCompetitionListDto();
                    dto.Id = item.Id;
                    dto.Name = item.Name;
                    list.Add(dto);
                }
                res.Data = list;
                res.Code = HttpResultCode.Success;
                res.Message = "获取成功";
                res.IsSuccess = true;
                res.Count = com.Count;
            }
            else
            {
                res.Code = HttpResultCode.NotData;
                res.Message = "未查询到数据";
                res.IsSuccess = true;
                res.Count = 0;
            }

            return res;
        }

        /// <summary>
        /// 客户端分页获取赛事信息（用于信息同步）
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public async Task<PagePagingDto<GetPageCompetitionKHDDto>> GetPageCompetitionKHD(BasePageQuery query)
        {
            PagePagingDto<GetPageCompetitionKHDDto> pagingDto = new();
            try {
                var token = UldAdminSessionContext.GetCurrentUserInfo(_context);
                var retlist = (await repository.GetAllListAsync(info => info.IsDeleted == false))
                               .WhereIF(token.CompanyId != null, info => info.Merchants == token.CompanyId).ToList();
                var pageretlist = retlist.Skip(query.PageSize * (query.PageIndex - 1))
                .Take(query.PageSize).ToList();
                if (pageretlist != null && pageretlist.Count() > 0)
                {
                    pagingDto.IsSuccess = true;
                    pagingDto.Code = HttpResultCode.Success;
                    pagingDto.Message = "查询成功！";
                    pagingDto.Data = ObjectMapper.Map<List<GetPageCompetitionKHDDto>>(pageretlist);
                    pagingDto.TotalCount = retlist.Count;
                }
                else {
                    pagingDto.IsSuccess = true;
                    pagingDto.Code = HttpResultCode.NotData;
                    pagingDto.Message = "未查询到数据！";
                }
            } catch (Exception ex) {
                pagingDto.IsSuccess = false;
                pagingDto.Code = HttpResultCode.Error;
                pagingDto.Message = ex.Message.ToString();
            }
            return pagingDto;
        }

        /// <summary>
        /// 客户端赛事信息同步
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public async Task<BaseResultDto> CompetitionSynchronization(List<CompetitionSynchronizationQuery> query)
        {
            BaseResultDto baseResultDto = new();
            try {
                foreach (var item in query)
                {
                    var cominfo = ObjectMapper.Map<Competition>(item);
                    await repository.InsertOrUpdateAsync(cominfo);
                }
                baseResultDto.IsSuccess = true;
                baseResultDto.Code = HttpResultCode.Success;
                baseResultDto.Message = "同步成功！";

            } catch (Exception e) {
                baseResultDto.IsSuccess = false;
                baseResultDto.Code = HttpResultCode.Error;
                baseResultDto.Message = e.Message.ToString();
            }
            return baseResultDto;
        }

        #endregion


    }
}
